<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="blocks/grade_me/db" VERSION="20120805" COMMENT="XMLDB file for Moodle blocks/grade_me"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
  <TABLES>
    <TABLE NAME="block_grade_me" COMMENT="Caches information about gradeable items.">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="itemname"/>
        <FIELD NAME="itemname" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="itemtype"/>
        <FIELD NAME="itemtype" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" PREVIOUS="itemname" NEXT="itemmodule"/>
        <FIELD NAME="itemmodule" TYPE="char" LENGTH="30" NOTNULL="false" SEQUENCE="false" PREVIOUS="itemtype" NEXT="iteminstance"/>
        <FIELD NAME="iteminstance" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" PREVIOUS="itemmodule" NEXT="itemsortorder"/>
        <FIELD NAME="itemsortorder" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="iteminstance" NEXT="courseid"/>
        <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="itemsortorder" NEXT="coursename"/>
        <FIELD NAME="coursename" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="courseid" NEXT="coursemoduleid"/>
        <FIELD NAME="coursemoduleid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="coursename"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="id" />
        <KEY NAME="id" TYPE="foreign" FIELDS="id" REFTABLE="grade_items" REFFIELDS="id" PREVIOUS="primary" NEXT="courseid"/>
        <KEY NAME="courseid" TYPE="foreign" FIELDS="courseid" REFTABLE="course" REFFIELDS="id" PREVIOUS="id" NEXT="coursemoduleid"/>
        <KEY NAME="coursemoduleid" TYPE="foreign" FIELDS="coursemoduleid" REFTABLE="course_modules" REFFIELDS="id" PREVIOUS="courseid"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="courseid-itemmodule" UNIQUE="false" FIELDS="courseid, itemmodule" NEXT="itemsortorder"/>
        <INDEX NAME="itemsortorder" UNIQUE="false" FIELDS="itemsortorder" PREVIOUS="courseid-itemmodule"/>
      </INDEXES>
    </TABLE>
  </TABLES>
</XMLDB>

